import { Module } from '@nestjs/common';
import { AuthService } from './auth.service';
import { AuthController } from './auth.controller';
import { DatabaseModule } from 'src/common/database/database.module';
import { JwtModule } from '@nestjs/jwt';
import { userProviders } from 'src/user/user.providers';
import { UserService } from 'src/user/user.service';
const jwtModule = JwtModule.register({
  secret: '加密',
  signOptions: { expiresIn: '7d' },
});

@Module({
  imports: [DatabaseModule, jwtModule],
  controllers: [AuthController],
  providers: [...userProviders, AuthService, UserService],
  exports: [jwtModule, AuthService],
})
export class AuthModule {}
